-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Resolve the prelude import in build_reduced_graph
#145322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve the prelude import in build_reduced_graph
#145322
Conversation
Could you also add this case to tests? //@ check-pass
#![feature(custom_inner_attributes)]
#![rustfmt::skip]
fn main() {
let _ = todo!();
} |
I am currently unable to implement any of your suggestions; it is the prelude import that can not be resolved during |
@Voultapher |
Suggestions worked, however, we can't emit an error when the prelude is already set, I just used a panic for ease of use, and it was triggered when compiling stdlib:
I also can't avoid to only resolve the prelude path when the prelude is not set. Errors like these get emitted:
@rustbot ready |
Okay, I see, in |
This comment has been minimized.
This comment has been minimized.
@petrochenkov I've tested #139493 with this PR and I can confirm it does resolve the problem in question, but I'm also seeing the same UI test failures reported by the CI here. |
Small addendum, I had hopped that fixing the |
Which tests are you talking about? |
I also tried to make CI green, those changes are in the second commit. @rustbot ready |
1c9ebd8
to
0ae3040
Compare
r=me after fixing typos #145322 (comment) and squashing commits. |
Reminder, once the PR becomes ready for a review, use |
0ae3040
to
ff560d3
Compare
@bors2 r=petrochenkov @rustbot ready |
@LorrensP-2158466: 🔑 Insufficient privileges: not in review users |
@bors r+ |
…cessing, r=petrochenkov Resolve the prelude import in `build_reduced_graph` This pr tries to resolve the prelude import at the `build_reduced_graph` stage. Part of batched import resolution in rust-lang#145108 (cherry picked commit) and maybe needed for rust-lang#139493. r? petrochenkov
Rollup of 22 pull requests Successful merges: - #118087 (Add Ref/RefMut try_map method) - #122661 (Change the desugaring of `assert!` for better error output) - #140740 (Add `-Zindirect-branch-cs-prefix`) - #142640 (Implement autodiff using intrinsics) - #143075 (compiler: Allow `extern "interrupt" fn() -> !`) - #144865 (Fix tail calls to `#[track_caller]` functions) - #144944 (E0793: Clarify that it applies to unions as well) - #144947 (Fix description of unsigned `checked_exact_div`) - #145004 (Couple of minor cleanups) - #145005 (strip prefix of temporary file names when it exceeds filesystem name length limit) - #145012 (Tail call diagnostics to include lifetime info) - #145065 (resolve: Introduce `RibKind::Block`) - #145120 (llvm: Accept new LLVM lifetime format) - #145189 (Weekly `cargo update`) - #145235 (Minor `[const]` tweaks) - #145275 (fix(compiler/rustc_codegen_llvm): apply `target-cpu` attribute) - #145322 (Resolve the prelude import in `build_reduced_graph`) - #145331 (Make std use the edition 2024 prelude) - #145369 (Do not ICE on private type in field of unresolved struct) - #145378 (Add `FnContext` in parser for diagnostic) - #145389 ([rustdoc] Revert "rustdoc search: prefer stable items in search results") - #145392 (coverage: Remove intermediate data structures from mapping creation) r? `@ghost` `@rustbot` modify labels: rollup
…cessing, r=petrochenkov Resolve the prelude import in `build_reduced_graph` This pr tries to resolve the prelude import at the `build_reduced_graph` stage. Part of batched import resolution in rust-lang#145108 (cherry picked commit) and maybe needed for rust-lang#139493. r? petrochenkov
Rollup of 21 pull requests Successful merges: - #118087 (Add Ref/RefMut try_map method) - #122661 (Change the desugaring of `assert!` for better error output) - #142640 (Implement autodiff using intrinsics) - #143075 (compiler: Allow `extern "interrupt" fn() -> !`) - #144865 (Fix tail calls to `#[track_caller]` functions) - #144944 (E0793: Clarify that it applies to unions as well) - #144947 (Fix description of unsigned `checked_exact_div`) - #145004 (Couple of minor cleanups) - #145005 (strip prefix of temporary file names when it exceeds filesystem name length limit) - #145012 (Tail call diagnostics to include lifetime info) - #145065 (resolve: Introduce `RibKind::Block`) - #145120 (llvm: Accept new LLVM lifetime format) - #145189 (Weekly `cargo update`) - #145235 (Minor `[const]` tweaks) - #145275 (fix(compiler/rustc_codegen_llvm): apply `target-cpu` attribute) - #145322 (Resolve the prelude import in `build_reduced_graph`) - #145331 (Make std use the edition 2024 prelude) - #145369 (Do not ICE on private type in field of unresolved struct) - #145378 (Add `FnContext` in parser for diagnostic) - #145389 ([rustdoc] Revert "rustdoc search: prefer stable items in search results") - #145392 (coverage: Remove intermediate data structures from mapping creation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #145322 - LorrensP-2158466:early-prelude-processing, r=petrochenkov Resolve the prelude import in `build_reduced_graph` This pr tries to resolve the prelude import at the `build_reduced_graph` stage. Part of batched import resolution in #145108 (cherry picked commit) and maybe needed for #139493. r? petrochenkov
This pr tries to resolve the prelude import at the
build_reduced_graph
stage.Part of batched import resolution in #145108 (cherry picked commit) and maybe needed for #139493.
r? petrochenkov